Optimal. Leaf size=177 \[ -\frac {2 a (5 A+3 (B+C)) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 a (7 A+7 B+5 C) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {2 a C \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 a (B+C) \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 a (7 A+7 B+5 C) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 a (5 A+3 (B+C)) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.22, antiderivative size = 177, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {4197, 3110,
3100, 2827, 2716, 2720, 2719} \begin {gather*} \frac {2 a (7 A+7 B+5 C) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}-\frac {2 a (5 A+3 (B+C)) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 a (7 A+7 B+5 C) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 a (5 A+3 (B+C)) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}}+\frac {2 a (B+C) \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 a C \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2716
Rule 2719
Rule 2720
Rule 2827
Rule 3100
Rule 3110
Rule 4197
Rubi steps
\begin {align*} \int \frac {(a+a \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx &=\int \frac {(a+a \cos (c+d x)) \left (C+B \cos (c+d x)+A \cos ^2(c+d x)\right )}{\cos ^{\frac {9}{2}}(c+d x)} \, dx\\ &=\frac {2 a C \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}-\frac {2}{7} \int \frac {-\frac {7}{2} a (B+C)-\frac {1}{2} a (7 A+7 B+5 C) \cos (c+d x)-\frac {7}{2} a A \cos ^2(c+d x)}{\cos ^{\frac {7}{2}}(c+d x)} \, dx\\ &=\frac {2 a C \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 a (B+C) \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}-\frac {4}{35} \int \frac {-\frac {5}{4} a (7 A+7 B+5 C)-\frac {7}{4} a (5 A+3 (B+C)) \cos (c+d x)}{\cos ^{\frac {5}{2}}(c+d x)} \, dx\\ &=\frac {2 a C \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 a (B+C) \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {1}{7} (a (7 A+7 B+5 C)) \int \frac {1}{\cos ^{\frac {5}{2}}(c+d x)} \, dx+\frac {1}{5} (a (5 A+3 (B+C))) \int \frac {1}{\cos ^{\frac {3}{2}}(c+d x)} \, dx\\ &=\frac {2 a C \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 a (B+C) \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 a (7 A+7 B+5 C) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 a (5 A+3 (B+C)) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}}+\frac {1}{21} (a (7 A+7 B+5 C)) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx-\frac {1}{5} (a (5 A+3 (B+C))) \int \sqrt {\cos (c+d x)} \, dx\\ &=-\frac {2 a (5 A+3 (B+C)) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 a (7 A+7 B+5 C) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {2 a C \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 a (B+C) \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 a (7 A+7 B+5 C) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 a (5 A+3 (B+C)) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 4 in
optimal.
time = 6.75, size = 1284, normalized size = 7.25 \begin {gather*} a \left (\sqrt {\cos (c+d x)} (1+\cos (c+d x)) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \left (\frac {(5 A+3 B+3 C) \csc (c) \sec (c)}{5 d}+\frac {C \sec (c) \sec ^4(c+d x) \sin (d x)}{7 d}+\frac {\sec (c) \sec ^3(c+d x) (5 C \sin (c)+7 B \sin (d x)+7 C \sin (d x))}{35 d}+\frac {\sec (c) \sec ^2(c+d x) (21 B \sin (c)+21 C \sin (c)+35 A \sin (d x)+35 B \sin (d x)+25 C \sin (d x))}{105 d}+\frac {\sec (c) \sec (c+d x) (35 A \sin (c)+35 B \sin (c)+25 C \sin (c)+105 A \sin (d x)+63 B \sin (d x)+63 C \sin (d x))}{105 d}\right )-\frac {A (1+\cos (c+d x)) \csc (c) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2(d x-\text {ArcTan}(\cot (c)))\right ) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec (d x-\text {ArcTan}(\cot (c))) \sqrt {1-\sin (d x-\text {ArcTan}(\cot (c)))} \sqrt {-\sqrt {1+\cot ^2(c)} \sin (c) \sin (d x-\text {ArcTan}(\cot (c)))} \sqrt {1+\sin (d x-\text {ArcTan}(\cot (c)))}}{3 d \sqrt {1+\cot ^2(c)}}-\frac {B (1+\cos (c+d x)) \csc (c) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2(d x-\text {ArcTan}(\cot (c)))\right ) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec (d x-\text {ArcTan}(\cot (c))) \sqrt {1-\sin (d x-\text {ArcTan}(\cot (c)))} \sqrt {-\sqrt {1+\cot ^2(c)} \sin (c) \sin (d x-\text {ArcTan}(\cot (c)))} \sqrt {1+\sin (d x-\text {ArcTan}(\cot (c)))}}{3 d \sqrt {1+\cot ^2(c)}}-\frac {5 C (1+\cos (c+d x)) \csc (c) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2(d x-\text {ArcTan}(\cot (c)))\right ) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec (d x-\text {ArcTan}(\cot (c))) \sqrt {1-\sin (d x-\text {ArcTan}(\cot (c)))} \sqrt {-\sqrt {1+\cot ^2(c)} \sin (c) \sin (d x-\text {ArcTan}(\cot (c)))} \sqrt {1+\sin (d x-\text {ArcTan}(\cot (c)))}}{21 d \sqrt {1+\cot ^2(c)}}+\frac {A (1+\cos (c+d x)) \csc (c) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \left (\frac {\, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2(d x+\text {ArcTan}(\tan (c)))\right ) \sin (d x+\text {ArcTan}(\tan (c))) \tan (c)}{\sqrt {1-\cos (d x+\text {ArcTan}(\tan (c)))} \sqrt {1+\cos (d x+\text {ArcTan}(\tan (c)))} \sqrt {\cos (c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}} \sqrt {1+\tan ^2(c)}}-\frac {\frac {\sin (d x+\text {ArcTan}(\tan (c))) \tan (c)}{\sqrt {1+\tan ^2(c)}}+\frac {2 \cos ^2(c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}}{\cos ^2(c)+\sin ^2(c)}}{\sqrt {\cos (c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}}}\right )}{2 d}+\frac {3 B (1+\cos (c+d x)) \csc (c) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \left (\frac {\, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2(d x+\text {ArcTan}(\tan (c)))\right ) \sin (d x+\text {ArcTan}(\tan (c))) \tan (c)}{\sqrt {1-\cos (d x+\text {ArcTan}(\tan (c)))} \sqrt {1+\cos (d x+\text {ArcTan}(\tan (c)))} \sqrt {\cos (c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}} \sqrt {1+\tan ^2(c)}}-\frac {\frac {\sin (d x+\text {ArcTan}(\tan (c))) \tan (c)}{\sqrt {1+\tan ^2(c)}}+\frac {2 \cos ^2(c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}}{\cos ^2(c)+\sin ^2(c)}}{\sqrt {\cos (c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}}}\right )}{10 d}+\frac {3 C (1+\cos (c+d x)) \csc (c) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \left (\frac {\, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2(d x+\text {ArcTan}(\tan (c)))\right ) \sin (d x+\text {ArcTan}(\tan (c))) \tan (c)}{\sqrt {1-\cos (d x+\text {ArcTan}(\tan (c)))} \sqrt {1+\cos (d x+\text {ArcTan}(\tan (c)))} \sqrt {\cos (c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}} \sqrt {1+\tan ^2(c)}}-\frac {\frac {\sin (d x+\text {ArcTan}(\tan (c))) \tan (c)}{\sqrt {1+\tan ^2(c)}}+\frac {2 \cos ^2(c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}}{\cos ^2(c)+\sin ^2(c)}}{\sqrt {\cos (c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}}}\right )}{10 d}\right ) \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(821\) vs.
\(2(211)=422\).
time = 0.37, size = 822, normalized size = 4.64
method | result | size |
default | \(\text {Expression too large to display}\) | \(822\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.50, size = 263, normalized size = 1.49 \begin {gather*} \frac {-5 i \, \sqrt {2} {\left (7 \, A + 7 \, B + 5 \, C\right )} a \cos \left (d x + c\right )^{4} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + 5 i \, \sqrt {2} {\left (7 \, A + 7 \, B + 5 \, C\right )} a \cos \left (d x + c\right )^{4} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 21 i \, \sqrt {2} {\left (5 \, A + 3 \, B + 3 \, C\right )} a \cos \left (d x + c\right )^{4} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 21 i \, \sqrt {2} {\left (5 \, A + 3 \, B + 3 \, C\right )} a \cos \left (d x + c\right )^{4} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + 2 \, {\left (21 \, {\left (5 \, A + 3 \, B + 3 \, C\right )} a \cos \left (d x + c\right )^{3} + 5 \, {\left (7 \, A + 7 \, B + 5 \, C\right )} a \cos \left (d x + c\right )^{2} + 21 \, {\left (B + C\right )} a \cos \left (d x + c\right ) + 15 \, C a\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{105 \, d \cos \left (d x + c\right )^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a \left (\int \frac {A}{\cos ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx + \int \frac {A \sec {\left (c + d x \right )}}{\cos ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx + \int \frac {B \sec {\left (c + d x \right )}}{\cos ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx + \int \frac {B \sec ^{2}{\left (c + d x \right )}}{\cos ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx + \int \frac {C \sec ^{2}{\left (c + d x \right )}}{\cos ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx + \int \frac {C \sec ^{3}{\left (c + d x \right )}}{\cos ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.44, size = 223, normalized size = 1.26 \begin {gather*} \frac {6\,C\,a\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {5}{4},\frac {1}{2};\ -\frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )+30\,A\,a\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )+10\,B\,a\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{15\,d\,{\cos \left (c+d\,x\right )}^{5/2}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}}+\frac {30\,C\,a\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {7}{4},\frac {1}{2};\ -\frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )+70\,A\,a\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )+42\,B\,a\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {5}{4},\frac {1}{2};\ -\frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{105\,d\,{\cos \left (c+d\,x\right )}^{7/2}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________